<?php
$news = $this->news;
?>

<? foreach ($news as $article): ?>

<div class="row" style="margin: 10px;margin-left: 4px;">
    <div class="img" style="float: left;margin-right: 5px;">
        <a href="<?= $this->url(array('id' => $article['id']), 'news_view') ?>">
        <?php if (empty($article['img'])): ?>
            <img src="http://placehold.it/100x100">
        <?php else: ?>
            <img style="height: 100px;width:100px;" src="<?php echo $this->image($article['img']) ?>" alt="<?php echo $article['title'] ?>">
        <?php endif;  ?>
        </a>
    </div>
    <div class="textofnews">
        <h3 style="line-height: 18px;"><a href="<?= $this->url(array('id' => $article['id']), 'news_view') ?>">
            <?= $article['title'] ?>
        </a></h3>

        <div>
            <?= $this->truncate(strip_tags($article['content']), 300) ?>
        </div>
    </div>
</div>

<? endforeach; ?>

<?php echo $this->partial('/paginator/common.phtml', array('paginator' => $this->paginator)) ?>
